/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/



#if !defined(AFX_PGLFONT_H__83FE3C8D_06FC_4687_9D23_328F0EB68859__INCLUDED_)
#define AFX_PGLFONT_H__83FE3C8D_06FC_4687_9D23_328F0EB68859__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CPGLArchive;

/*! \brief A font.

\ingroup PGLTextGroup
A font with OpenGL and EPS connections... bitmap or outline.
You must choose when creating the font bitmap or glyph.
\sa CPGLFontManager
\sa CPGLText
*/
class PGLCORE_EXT_CLASS CPGLFont : public CFont  
{
DECLARE_DYNCREATE(CPGLFont);

public:
	// default constructor,
	CPGLFont();
	virtual ~CPGLFont();

	/// returns the extent the text in screen coorinate
	POINTFLOAT GetTextExtent(const CString& string);
	/// loads the font in the eps file.
	void SetFontGfx(gfxinterface::CGfxInterface& gfx);

	void SetLOGFONT(const LOGFONT& lf)	{	m_lf=lf;};
	const LOGFONT& GetLOGFONT() const	{	return m_lf;};

	LONG GetHeight() const {	return abs(m_lf.lfHeight);};
	int GetHeightPixels() const {	return abs(m_lf.lfHeight);};

	/// Serialize functions
	void SerializeXML(CPGLArchive& ar);

	/// Debuggin functions
	#ifdef _DEBUG
	    virtual void Dump( CDumpContext& dc ) const;
	    virtual void AssertValid() const;    // Override
	#endif

protected:
	LOGFONT m_lf;
};

#endif // !defined(AFX_PGLFONT_H__83FE3C8D_06FC_4687_9D23_328F0EB68859__INCLUDED_)
